//    Copyright (C) Kherty.  All rights reserved.
using System.Windows.Data;

namespace OpenLS.Spreadsheet.UI
{
    class PaneStateToBooleanConverter : IValueConverter
    {
        #region IValueConverter Members

        public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value is PaneState)
            {
                var s = (PaneState) value;
                switch (s)
                {case PaneState.FrozenSplit:
                case PaneState.Split:
                        return true;
                }
            }
            return false;
        }

        public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new System.NotSupportedException();
        }

        #endregion
    }
}